﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using FlashCards.Model;
using System.Drawing;
using System.IO;

namespace FlashCards.WebApp.Models
{
    public class FriendModel
    {
        public FriendModel(User user)
        {
            UserId = user.UserId;
            UserName = user.Nick;
            Name = user.Name;
            Surname = user.Surname;

            //using (var stream = new MemoryStream(user.Avatar.Data))
            //{
            //    Avatar = Image.FromStream(stream);
            //}
        }

        public int UserId { get; set; }
        [Display(Name="Nick")]
        public string UserName { get; set; }
        public string Name { get; set; }
        public string Surname { get; set; }
    }
}